package com.perdragon.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.perdragon.entity.Institution;
import com.perdragon.repository.InstitutionRepository;
import com.perdragon.service.InstitutionService;

@Service
public class InstitutionServiceImpl implements InstitutionService {
	@Autowired
	private InstitutionRepository institutionRepository;

	public int addInstitution(Institution institution) {
		return institutionRepository.addInstitution(institution);
	}

	public int deleteInstitution(int id) {
		return institutionRepository.deleteInstitution(id);
	}

	public int updateInstitution(Institution institution) {
		return institutionRepository.updateInstitution(institution);
	}

	public List<Institution> listInstitution(int startRow) {
		return institutionRepository.listInstitution(startRow);
	}

	public int getRowNum() {
		return institutionRepository.getRowNum();
	}

	public Institution showDetail(int id) {
		return institutionRepository.showDetail(id);
	}

	public List<Institution> getInstitution(int id) {
		return institutionRepository.selectId(id);
	}
}
